<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>DIRECT</title>
<link href="<%=request.getContextPath()%>/css/global.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/global.js"></script>
<script type="text/javascript" >

$(function(){
	cardMock('t');
})

var visas = ['4027388183608181','4070033174485845','4113620408263524','4122664030601510','4225126527787646','4226150758245735','4239414273415784','4241556851615718','4250224516487621','4253804238642210','4271382772432833','4301845106653757','4317377571067588','4332037830728716','4342661878710233','4368723435722876','4413645021612168','4424203531542306','4503761156178767','4537326766301157','4543556026346616','4719537342762742','4921066574056320'];
var masters = ['5120254677258763','5150304725413580','5183450243226482','5204606817706184','5207143753614526','5210515486421466','5212164616735244','5215525313401685','5218886251726641','5220442573145718','5225160003377660','5227625108362302','5229321101083503','5234475622683317','5286468615112367','5255011421200377','5406230663731125'];
var months = ['01','02','03','04','05','06','07','08','09','10','11','12'];
var years = ['21','22','23','24','25','26','27','28','29','30'];

function cardMock(type){
	if(type=="v"){
		$("#number").val(visas[Math.floor(Math.random()*visas.length)]);
	}
	if(type=="m"){
		$("#number").val(masters[Math.floor(Math.random()*masters.length)]);
	}
	if(type=="t"){
		$("#number").val("4000000000000002");
	}
	if(type=="y"){
		$("#number").val("4283428305041009");
	}
	$("#expireMonth").val(months[Math.floor(Math.random()*months.length)]);
	$("#expireYear").val(years[Math.floor(Math.random()*years.length)]);
	$("#cvv").val(randomNumber(3));
}
</script>
</head>
<body style="background-color: #1c3e57; margin: 10px;">
	<div style="padding: 25px; margin-bottom: 10px; border: 1px dotted #ccc; background-color: #fff;">
		<h1><a href="<%=request.getContextPath (  )%>">首页</a> | 模拟网站提交订单支付</h1>
	</div>
	<div style="padding: 25px; border: 1px dotted #ccc; background-color: #fff;">
	<form id="sform" action="<%=request.getContextPath()%>/pay.jsp" method="post">
	<table border="0" width="100%" >
			<tr>
				<td width="25%">支付参数 : </td>
				<td width="25%">持卡人参数 : <input class="submit" type="button" style="width:50px;" value="4111" onclick="cardMock('t')"><input class="submit" type="button" style="width:50px;" value="4283" onclick="cardMock('y')"><input class="submit" type="button" style="width:50px;" value="V卡" onclick="cardMock('v')"><input class="submit" type="button" style="width:50px;" value="M卡" onclick="cardMock('m')"></td>
				<td width="25%">收货参数 : </td>
				<td width="25%">账单参数 : </td>
			</tr>
			<tr>
				<td><hr/></td>
				<td><hr/></td>
				<td><hr/></td>
				<td><hr/></td>
			</tr>
			<tr>
				<td>子帐号:</td>
				<td>IP:</td>
				<td>收货人 FirstName - LastName:</td>
				<td>账单人 FirstName - LastName:</td>
			</tr>
			<tr>
				<td><input style="border: none;color: red;width:240px;" readonly="readonly" type="text" name="no" value="<%=request.getParameter("no") %>"/></td>
				<td><input style="border: none;color: red;width:240px;" readonly="readonly" type="text" name="ip" value="<%=request.getParameter("ip") %>"/></td>
				<td><input style="border: none;color: red;width:60px;" readonly="readonly" type="text" name="cfname" value="<%=request.getParameter("cfname") %>"/> <input style="border: none;color: red;width:60px;" readonly="readonly" type="text" name="clname" value="<%=request.getParameter("clname") %>"/> </td>
				<td><input style="border: none;color: red;width:60px;" readonly="readonly" type="text" name="hfname" value="<%=request.getParameter("hfname") %>"/> <input style="border: none;color: red;width:60px;" readonly="readonly" type="text" name="hlname" value="<%=request.getParameter("hlname") %>"/> </td>
			</tr>
			<tr>
				<td>KEY:</td>
				<td>操作系统:</td>
				<td>收货电话:</td>
				<td>账单电话:</td>
			</tr>
			<tr>
				<td><input style="border: none;color: red;width:240px;" readonly="readonly" type="text" name="key" value="<%=request.getParameter("key") %>"/></td>
				<td><input style="border: none;color: red;width:240px;" readonly="readonly" type="text" name="os" value="<%=request.getParameter("os") %>"/></td>
				<td><input style="border: none;color: red;width:240px;" readonly="readonly" type="text" name="cphone" value="<%=request.getParameter("cphone") %>"/></td>
				<td><input style="border: none;color: red;width:240px;" readonly="readonly" type="text" name="hphone" value="<%=request.getParameter("hphone") %>"/></td>
			</tr>
			<tr>
				<td>订单号:</td>
				<td>浏览器:</td>
				<td>收货邮箱:</td>
				<td>账单邮箱:</td>
			</tr>
			<tr>
				<td><input style="border: none;color: red;width:240px;" readonly="readonly" type="text" name="order" value="<%=request.getParameter("order") %>"/></td>
				<td><input style="border: none;color: red;width:240px;" readonly="readonly" type="text" name="browser" value="<%=request.getParameter("browser") %>"/></td>
				<td><input style="border: none;color: red;width:240px;" readonly="readonly" type="text" name="cemail" value="<%=request.getParameter("cemail") %>"/></td>
				<td><input style="border: none;color: red;width:240px;" readonly="readonly" type="text" name="hemail" value="<%=request.getParameter("hemail") %>"/></td>
			</tr>
			<tr>
				<td>来源网址:</td>
				<td>指纹:</td>
				<td>收货国家:</td>
				<td>账单国家:</td>
			</tr>
			<tr>
				<td><input style="border: none;color: red;width:240px;" readonly="readonly" type="text" name="site" value="<%=request.getParameter("site") %>"/></td>
				<td><input style="border: none;color: red;width:240px;" readonly="readonly" type="text" name="finger" value="<%=request.getParameter("finger") %>"/></td>
				<td><input style="border: none;color: red;width:240px;" readonly="readonly" type="text" name="ccountry" value="<%=request.getParameter("ccountry") %>"/></td>
				<td><input style="border: none;color: red;width:240px;" readonly="readonly" type="text" name="hcountry" value="<%=request.getParameter("hcountry") %>"/></td>
			</tr>
			<tr>
				<td>币种:</td>
				<td>语言类型:</td>
				<td>收货州/省:</td>
				<td>账单州/省:</td>
			</tr>
			<tr>
				<td><input style="border: none;color: red;width:240px;" readonly="readonly" type="text" name="cur" value="<%=request.getParameter("cur") %>"/></td>
				<td><input style="border: none;color: red;width:240px;" readonly="readonly" type="text" name="locale" value="<%=request.getParameter("locale") %>"/></td>
				<td><input style="border: none;color: red;width:240px;" readonly="readonly" type="text" name="cstate" value="<%=request.getParameter("cstate") %>"/></td>
				<td><input style="border: none;color: red;width:240px;" readonly="readonly" type="text" name="hstate" value="<%=request.getParameter("hstate") %>"/></td>
			</tr>
			<tr>
				<td>金额:</td>
				<td>时区:</td>
				<td>收货市:</td>
				<td>账单市:</td>
			</tr>
			<tr>
				<td><input style="border: none;color: red;width:240px;" readonly="readonly" type="text" name="loc" value="<%=request.getParameter("loc") %>"/></td>
				<td><input style="border: none;color: red;width:240px;" readonly="readonly" type="text" name="timing" value="<%=request.getParameter("timing") %>"/></td>
				<td><input style="border: none;color: red;width:240px;" readonly="readonly" type="text" name="ccity" value="<%=request.getParameter("ccity") %>"/></td>
				<td><input style="border: none;color: red;width:240px;" readonly="readonly" type="text" name="hcity" value="<%=request.getParameter("hcity") %>"/></td>
			</tr>
			<tr>
				<td>通知地址:</td>
				<td>卡号:</td>
				<td>收货地址:</td>
				<td>账单地址:</td>
			</tr>
			<tr>
				<td><input style="border: none;color: red;width:240px;" readonly="readonly" type="text" name="notify" value="<%=request.getParameter("notify") %>"/></td>
				<td><input style="width: 240px;" type="text" id="number" name="number"></td>
				<td><input style="border: none;color: red;width:240px;" readonly="readonly" type="text" name="caddr" value="<%=request.getParameter("caddr") %>"/></td>
				<td><input style="border: none;color: red;width:240px;" readonly="readonly" type="text" name="haddr" value="<%=request.getParameter("haddr") %>"/></td>
			</tr>
			<tr>
				<td>产品信息:</td>
				<td>有效期:</td>
				<td>收货邮编:</td>
				<td>账单邮编:</td>
			</tr>
			<tr>
				<td><input style="border: none;color: red;width:240px;" readonly="readonly" type="text" name="product" value="<%=request.getParameter("product") %>"/></td>
				<td><input style="width: 60px;" type="text" id="expireMonth" name="expireMonth"> - <input style="width: 60px;" type="text" id="expireYear" name="expireYear"> MM-YY</td>
				<td><input style="border: none;color: red;width:240px;" readonly="readonly" type="text" name="czip" value="<%=request.getParameter("czip") %>"/></td>
				<td><input style="border: none;color: red;width:240px;" readonly="readonly" type="text" name="hzip" value="<%=request.getParameter("hzip") %>"/></td>
			</tr>
			<tr>
				<td>版本号:<input style="border: none;color: red;width:240px;" readonly="readonly" type="text" name="version" value="<%=request.getParameter("version") %>"/></td>
				<td>CVV:</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
			</tr>
			<tr>
				<td>
					送往:<input style="border: none;color: red;width:240px;" readonly="readonly" type="text" name="check" value="<%= ("linux".equalsIgnoreCase(System.getProperty("os.name"))) ?"生产环境":"本地测试"%>"/>
				</td>
				<td><input style="width: 80px;" type="text" id="cvv" name="cvv"></td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
			</tr>
			<tr>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
			</tr>
			<tr>
				<td><hr/></td>
				<td><hr/></td>
				<td><hr/></td>
				<td><hr/></td>
			</tr>
			<tr>
				<td colspan="4" align="right">
					<input type="radio" id="directType1" name="direct" value="gateway" checked="checked">Gateway
					<input type="radio" id="directType2" name="direct" value="portal" >Portal
					<input type="submit" class="submit" value="提交订单" /></td>
			</tr>
		</table>
		</form>
	</div>
</body>